<!DOCTYPE html>
<html lang="en">
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.thymeleaf.org/thymeleaf-extras-shiro">



<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    首页<p th:text="${msg}"></p><br/><hr/>
    <!--<div shiro:notAuthenticated>
        <a th:href="@{/toLogin}">登陆</a>
    </div>-->
    <!--从session中判断是否登陆 -->
    <div th:if="${session.loginUser == null}">
        <a th:href="@{/toLogin}">登陆</a>
    </div>
    <div shiro:hasPermission="user:add"> <!--用户有user:add权限 则显示改菜单 -->
        <a th:href="@{/user/add}">add</a>
    </div>
    <div shiro:hasPermission="user:del">
        <a th:href="@{/user/del}">del</a>
    </div>


</body>
</html>